package com.ibest.base.controller;

import com.alibaba.fastjson.JSONObject;
import com.ibest.base.entity.RequestRecord;
import com.ibest.base.service.RedisService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/test")
public class CacheController {
    @Resource
    private RedisService redisService;

    @PostMapping("/findEntityById")
    public JSONObject findByIds(@RequestBody RequestRecord params){
       return (JSONObject)redisService.getCanalBinlogBean(params.getDbName(),params.getTableName(),params.getIds());
    }

    @GetMapping("/test")
    public String ok(){
        return "ok";
    }

}
